const tokenKey = 'token'

export const setToken = value => {
  return uni.setStorageSync(tokenKey, value)
}
export const getToken = () => {
  return uni.getStorageSync(tokenKey)
}

export const setItem = (key, value) => {
  return uni.setStorageSync(key, JSON.stringify(value))
}

export const getItem = key => {
  return uni.getStorageSync(key) && JSON.parse(uni.getStorageSync(key))
}
